# name : purrr::map_dfr on group/split
# key : group.map_dfr@purrr
# contributor: Shuguang Sun
# --
${1:dtout} <- ${2:dtin} |>
  dplyr::group_by(${3:var}) |>  ## dt to list
  purrr::map_dfr(
    .x = quos(x, y, z),
    .f = function(x, data) data |> count({{ x }}))